<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>构造函数</title>
	</head>
	<body>
		<script>
			function Flower(name,genera,ares,uses){
				this.name=name;
				this.genera=genera;
				this.ares=ares;
				this.uses=uses;
				this.showName=function(){
					alert(this.name);
				}
			}
			var flower1=new Flower("长春花","夹竹桃科 长春花属","非洲、亚热带、热带，以及中国大陆的华东、西南、中南等地","观赏或用药等",);
			flower1.showName();
			var flower2=new Flower("牡丹","芍药科 芍药属","中国","观赏或用药等",);
			flower2.showName();
			var flower2=new Flower("曼陀罗花","茄科 曼陀罗属","印度、中国北部","观赏或用药等",);
			flower2.showName();
		</script>
	</body>
</html>
